package com.annhoa.system.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQuery;

@Entity
@NamedQuery(name = "Address.findByName", query = "select name from Address where name=?1")
public class Address implements Serializable{

	private static final long serialVersionUID = -7255057424665704819L;
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private long addressId;
	@Column(name = "name")
	private String name;
	public long getAddressId() {
		return addressId;
	}
	public void setAddressId(long addressId) {
		this.addressId = addressId;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@Override
	public String toString() {
		return "Address [addressId=" + addressId + ", name=" + name + "]";
	}
	
}
